#include "widget.h"
#include "ui_widget.h"
#include"mypushbutton.h"
#include<QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    MyPushButton*button=new MyPushButton;
    button->setText("按钮");
//    button->close();
    button->setParent(this);
}

Widget::~Widget()
{
//    delete ui;
    qDebug()<<"Widget被析构函数调用了";
}

